//
//  OATableDelegate.m
//  OASDK_Works
//
//  Created by ChenJie on 3/29/20.
//  Copyright © 2020 Mist. All rights reserved.
//

#import "OATableDelegate.h"
#import "UITableView+OATableConfig.h"

@interface OATableDelegate ()

@end

@implementation OATableDelegate

#pragma mark - Lifecycle methods

- (instancetype)init {
    self = [super init];
    if (self) {
    }
    return self;
}

#pragma mark - Public methods



#pragma mark - Private methods



#pragma mark - Delegate methods



#pragma mark - <UITableViewDelegate>

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    CGFloat cellWidth = tableView.bounds.size.width;
    return [tableView.oa_tableConfig heightForRowWithCellWidth:cellWidth indexPath:indexPath];
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    [tableView.oa_tableConfig didSelectRowAtIndexPath:indexPath];
}

- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
    return [tableView.oa_tableConfig heightForHeaderInSection:section];
}

- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
    return [tableView.oa_tableConfig heightForFooterInSection:section];
}

#pragma mark - Setter



#pragma mark - Getter



#pragma mark - Memory management methods

- (void)dealloc {
}

@end
